{include file="public/header" title="站内信_米醋儿"}
{include file="public:user_top_nav"/}
<div class="layui-container  ucenter">
    <div class="layui-row">
        {include file="public/user_left_nav"}

        <div class="userCon layui-col-md10 layui-col-space20 layadmin-caller">
            <div class="fly-panel fly-panel-user" pad20>
                <div class="layui-tab layui-tab-brief" lay-filter="user">
                    <ul class="layui-tab-title" id="LAY_mine">
                        <li class="layui-this" lay-id="info">站内信</li>
                    </ul>


                    <div class="layui-tab-content" style="padding: 20px 0;">
                        <!--start-->
                        <div class="caller-contar">
                            {foreach $list as $k => $v}
                            <div class="caller-item">
                                {if $v.user.headimgurl}
                                <img src="{$v.user.headimgurl}" alt="" class="caller-img caller-fl">
                                {else/}
                                <img src="https://www.layui.com/admin/std/dist/layuiadmin/style/res/template/portrait.png" alt="" class="caller-img caller-fl">
                                {/if}
                                <div class="caller-main caller-fl">
                                    <p><strong>{$v.user.nickname}</strong> <em>发布时间：{$v.add_time}</em></p>
                                    <p class="caller-adds">

                                    <h2><i class="layui-icon layui-icon-read" title="文章"></i>
                                        <a class="c666" href="{:url('Article/read',['id'=>$v.id])}" target="_blank">{$v.title}</a>
                                    </h2>
                                    </p>
                                    <div class="caller-iconset">
                                        <!--<a href="javascript:;" onclick="view({$v.id})"><i class="layui-icon layui-icon-search"></i>预览 &nbsp;&nbsp;</a>-->
                                        <!--<a href="javascript:;" onclick="edit({$v.id})"><i class="layui-icon layui-icon-edit"></i>编辑 &nbsp;&nbsp;</a>-->
                                        <!--<a href="javascript:;" onclick="del({$v.id})"><i class="layui-icon layui-icon-delete"></i>删除 &nbsp;&nbsp;</a>-->

                                    </div>
                                </div>
                                <!--<button class="layui-btn layui-btn-sm caller-fr">-->
                                <!--<i class="layui-icon layui-icon-ok"></i>-->
                                <!--已收藏-->
                                <!--</button>-->
                            </div>
                            {/foreach}


                        </div>
                        <!--end-->
                        {$list|raw}
                    </div>

                </div>
            </div>
        </div>

    </div>
</div>
</div>
{include file="public/footer"}

<script>
    //Demo

    function del(id) {
        var url="{:url('news/delete')}";
        layer.confirm('确定要删除此记录么？', {
            btn: ['确定','取消'] //按钮
        }, function(){
            $.post(url,{id:id},function (e) {
                if(e.code == 200){
                    success(e.msg);
                    setTimeout("location.reload()",1000)
                }else {
                    error(e.msg)
                }
            })
        }, function(){
            layer.msg('已取消');
        });

    }
    function edit(id) {
        var url = "{:url('Uarticle/edit')}/id/"+id;
        url = url.replace(".html", "");
        location.href = url
    }

    //预览
    function view(id) {
        var url = "{:request()->domain()}/new/"+id;
        url = url.replace(".html", "");
        location.href = url
    }


</script>


